#ifndef _SPCKADAPTER_H_
#define _SPCKADAPTER_H_

#include <stdio.h>
#include <iostream>
#include <fstream>
#include <string>
#include <vector>

using namespace std;

struct SpckVariable
{
	string name;
	vector<string> items;
	string value;
	string comment;
};

struct SpckCosimBody
{
	int id;
	double mass;
	string name;	
	double momentOfInertia[3][3];
	string pos_x_name;
	string pos_y_name;
	string pos_z_name;
	string ort_x_name;
	string ort_y_name;
	string ort_z_name;
	string vel_x_name;
	string vel_y_name;
	string vel_z_name;
	string ang_vel_x_name;
	string ang_vel_y_name;
	string ang_vel_z_name;
	string fx_name;
	string fy_name;
	string fz_name;
	string tx_name;
	string ty_name;
	string tz_name;

};

enum VariableType
{
	POS_X = 1,
	POS_Y,
	POS_Z,
	ORT_X,
	ORT_Y,
	ORT_Z,
	VEL_X,
	VEL_Y,
	VEL_Z,
	ANG_VEL_X,
	ANG_VEL_Y,
	ANG_VEL_Z,
	F_X,
	F_Y,
	F_Z,
	T_X,
	T_Y,
	T_Z

};

struct SpckOutVariable
{
	string name;	
	VariableType outPutType;
	int type;
	string body;
};

struct SpckInVariable
{
	string name;
	string body;
	VariableType inPutType;
};



class SpckAdapter
{
public:
	SpckAdapter(string spckPath);
	vector< SpckCosimBody> GetSpckCosimBody();	
private:
	SpckVariable GetVariableValue(string variable);	
	vector< SpckOutVariable> GetOutVariables();
	vector< SpckInVariable> GetInVariables();	
	vector< SpckVariable> spackVariables;
};
#endif